﻿namespace NEclipse.CoreLib.Workspace.Views
{
  using System.Windows.Forms;
  using NEclipse.CoreLib.Localization;

  /// <summary>
  /// The project explorer implementation.
  /// </summary>
  public class ProjectExplorer : IView
  {
    /// <summary>
    /// User control used for the project explorer.
    /// </summary>
    private ProjectExplorerUserControl viewUserControl = new ProjectExplorerUserControl();

    /// <summary>
    /// Initializes a new instance of the <see cref="ProjectExplorer"/> class.
    /// </summary>
    public ProjectExplorer()
    {
    }

    /// <summary>
    /// Gets the views user control.
    /// </summary>
    public UserControl ViewUserControl
    {
      get
      {
        return this.viewUserControl;
      }
    }

    /// <summary>
    /// Gets the name of the view.
    /// </summary>
    public string Name
    {
      get
      {
        return ViewNames.ProjectExplorer;
      }
    }

    /// <summary>
    /// Initializes the instance with the specified workspace manager.
    /// </summary>
    /// <param name="workspaceManager">The workspace manager.</param>
    public void Initialize(WorkspaceManager workspaceManager)
    {
      this.viewUserControl.Initialize(workspaceManager);
    }
  }
}
